FROM crunchgeek/php-fpm:7.2
RUN rm -f /etc/apt/sources.list; \
    # echo 'deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib'>>/etc/apt/sources.list; \
    # echo 'deb http://mirrors.aliyun.com/debian/ stretch-proposed-updates main non-free contrib'>>/etc/apt/sources.list; \
    # echo 'deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib'>>/etc/apt/sources.list; \
    # echo 'deb-src http://mirrors.aliyun.com/debian/ stretch-proposed-updates main non-free contrib'>>/etc/apt/sources.list;
    echo 'deb http://mirrors.163.com/debian/ stretch main non-free contrib'>>/etc/apt/sources.list; \
    echo 'deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib'>>/etc/apt/sources.list; \
    echo 'deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib'>>/etc/apt/sources.list;\
    echo 'deb-src http://mirrors.163.com/debian/ stretch main non-free contrib'>>/etc/apt/sources.list;\
    echo 'deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib'>>/etc/apt/sources.list;\
    echo 'deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib'>>/etc/apt/sources.list;\
    echo 'deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib'>>/etc/apt/sources.list;\
    echo 'deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib'>>/etc/apt/sources.list;

RUN apt-get update && apt-get install -y --no-install-recommends cron vim

COPY ./crontab_demo /etc/cron.d/crontab
#RUN  chown root:crontab /etc/cron.d/crontab2
#RUN chmod 644 /etc/cron.d/crontab2
#RUN crontab /etc/cron.d/crontab2

ADD ./entrypoint.sh /entrypoint.sh

CMD cron  -f

